Previous Book Contents Book Index Next

Inside Macintosh: 3D Graphics Programming With QuickDraw 3D /
Chapter 20 - QuickDraw 3D Mathematical Utilities / QuickDraw 3D Mathematical Utilities Reference
QuickDraw 3D Mathematical Utilities / Determining Point Relative Ratios


Q3RationalPoint4D_RRatio

You can use the Q3RationalPoint4D_RRatio function to find a point lying between two given four-dimensional points that is at a desired distance ratio from one of those points.

TQ3RationalPoint4D *Q3RationalPoint4D_RRatio (
const TQ3RationalPoint4D *p1, 
const TQ3RationalPoint4D *p2, 
float r1, 
float r2, 
TQ3RationalPoint4D *result);
p1
A rational four-dimensional point.
p2
A rational four-dimensional point.
r1
A floating-point number.
r2
A floating-point number.
result
On exit, the four-dimensional point that is at a desired distance ratio from p1 along the line segment between p1 and p2.
DESCRIPTION
The Q3RationalPoint4D_RRatio function returns, as its function result and in the result parameter, the four-dimensional point that lies on the line segment lying between the points p1 and p2 and that is at a distance from the first point determined by the ratio r1/(r1 + r2).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
11 JUL 1996